﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;

namespace MyApp.WebApi.Migrations
{
    public partial class 添加基础表 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Attributes",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    AttributeName = table.Column<string>(type: "text", nullable: true),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Attributes", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "AttributeValues",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    Values = table.Column<string>(type: "text", nullable: true),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_AttributeValues", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "AuditInfo",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    Parameters = table.Column<string>(type: "text", nullable: true),
                    BrowserInfo = table.Column<string>(type: "text", nullable: true),
                    ClientName = table.Column<string>(type: "text", nullable: true),
                    ClientIpAddress = table.Column<string>(type: "text", nullable: true),
                    ExecutionDuration = table.Column<int>(type: "integer", nullable: false),
                    ExecutionTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    ReturnValue = table.Column<string>(type: "text", nullable: true),
                    Exception = table.Column<string>(type: "text", nullable: true),
                    MethodName = table.Column<string>(type: "text", nullable: true),
                    ServiceName = table.Column<string>(type: "text", nullable: true),
                    UserInfo = table.Column<string>(type: "text", nullable: true),
                    CustomData = table.Column<string>(type: "text", nullable: true),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_AuditInfo", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Catagorys",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    ParentId = table.Column<int>(type: "integer", nullable: false),
                    CatagoryName = table.Column<string>(type: "text", nullable: true),
                    Order = table.Column<string>(type: "text", nullable: true),
                    CatagorysId = table.Column<int>(type: "integer", nullable: true),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Catagorys", x => x.Id);
                    table.ForeignKey(
                        name: "FK_Catagorys_Catagorys_CatagorysId",
                        column: x => x.CatagorysId,
                        principalTable: "Catagorys",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "Comments",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    Comment = table.Column<string>(type: "text", nullable: true),
                    CommentScore = table.Column<int>(type: "integer", nullable: false),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Comments", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Goods",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    GoodsName = table.Column<string>(type: "text", nullable: true),
                    Description = table.Column<string>(type: "text", nullable: true),
                    GoodsCode = table.Column<int>(type: "integer", nullable: false),
                    Prices = table.Column<double>(type: "double precision", nullable: false),
                    CurrentPrices = table.Column<double>(type: "double precision", nullable: false),
                    Number = table.Column<int>(type: "integer", nullable: false),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Goods", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "InTurns",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    GoodsId = table.Column<int>(type: "integer", nullable: false),
                    InTurnPictures = table.Column<string>(type: "text", nullable: true),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_InTurns", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Orders",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    OrderCode = table.Column<int>(type: "integer", nullable: false),
                    TotalMoney = table.Column<double>(type: "double precision", nullable: false),
                    Price = table.Column<double>(type: "double precision", nullable: false),
                    Number = table.Column<int>(type: "integer", nullable: false),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Orders", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "PayWays",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    Ways = table.Column<string>(type: "text", nullable: true),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_PayWays", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Photos",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    Picture = table.Column<string>(type: "text", nullable: true),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Photos", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "ShoppingMalls",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    MallName = table.Column<string>(type: "text", nullable: true),
                    Logo = table.Column<string>(type: "text", nullable: true),
                    ICP = table.Column<string>(type: "text", nullable: true),
                    Public = table.Column<string>(type: "text", nullable: true),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ShoppingMalls", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Shoppings",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    Number = table.Column<int>(type: "integer", nullable: false),
                    Price = table.Column<double>(type: "double precision", nullable: false),
                    Sum = table.Column<double>(type: "double precision", nullable: false),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Shoppings", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Types",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    CommentType = table.Column<string>(type: "text", nullable: true),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Types", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "GoodsSpecs",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    AttributesId = table.Column<int>(type: "integer", nullable: false),
                    AttributeValuesId = table.Column<int>(type: "integer", nullable: false),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_GoodsSpecs", x => x.Id);
                    table.ForeignKey(
                        name: "FK_GoodsSpecs_Attributes_AttributesId",
                        column: x => x.AttributesId,
                        principalTable: "Attributes",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_GoodsSpecs_AttributeValues_AttributeValuesId",
                        column: x => x.AttributeValuesId,
                        principalTable: "AttributeValues",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "GoodsAttributes",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    GoodsId = table.Column<int>(type: "integer", nullable: false),
                    AttributesId = table.Column<int>(type: "integer", nullable: false),
                    AttributeValuesId = table.Column<int>(type: "integer", nullable: false),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_GoodsAttributes", x => x.Id);
                    table.ForeignKey(
                        name: "FK_GoodsAttributes_Attributes_AttributesId",
                        column: x => x.AttributesId,
                        principalTable: "Attributes",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_GoodsAttributes_AttributeValues_AttributeValuesId",
                        column: x => x.AttributeValuesId,
                        principalTable: "AttributeValues",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_GoodsAttributes_Goods_GoodsId",
                        column: x => x.GoodsId,
                        principalTable: "Goods",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "GoodsCatagorys",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    GoodsId = table.Column<int>(type: "integer", nullable: false),
                    CatagorysId = table.Column<int>(type: "integer", nullable: false),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_GoodsCatagorys", x => x.Id);
                    table.ForeignKey(
                        name: "FK_GoodsCatagorys_Catagorys_CatagorysId",
                        column: x => x.CatagorysId,
                        principalTable: "Catagorys",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_GoodsCatagorys_Goods_GoodsId",
                        column: x => x.GoodsId,
                        principalTable: "Goods",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "GoodsPhotos",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    GoodsId = table.Column<int>(type: "integer", nullable: false),
                    PhotosId = table.Column<int>(type: "integer", nullable: false),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_GoodsPhotos", x => x.Id);
                    table.ForeignKey(
                        name: "FK_GoodsPhotos_Goods_GoodsId",
                        column: x => x.GoodsId,
                        principalTable: "Goods",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_GoodsPhotos_Photos_PhotosId",
                        column: x => x.PhotosId,
                        principalTable: "Photos",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "Users",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    ShoppingsId = table.Column<int>(type: "integer", nullable: false),
                    Username = table.Column<string>(type: "text", nullable: true),
                    Password = table.Column<string>(type: "text", nullable: true),
                    IsManagement = table.Column<bool>(type: "boolean", nullable: false),
                    IsMerchant = table.Column<bool>(type: "boolean", nullable: false),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Users", x => x.Id);
                    table.ForeignKey(
                        name: "FK_Users_Shoppings_ShoppingsId",
                        column: x => x.ShoppingsId,
                        principalTable: "Shoppings",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "CommentTypes",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    CommentsId = table.Column<int>(type: "integer", nullable: false),
                    TypesId = table.Column<int>(type: "integer", nullable: false),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_CommentTypes", x => x.Id);
                    table.ForeignKey(
                        name: "FK_CommentTypes_Comments_CommentsId",
                        column: x => x.CommentsId,
                        principalTable: "Comments",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_CommentTypes_Types_TypesId",
                        column: x => x.TypesId,
                        principalTable: "Types",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "OrdersSpecs",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    OrdersId = table.Column<int>(type: "integer", nullable: false),
                    GoodsSpecsId = table.Column<int>(type: "integer", nullable: false),
                    GoodsId = table.Column<int>(type: "integer", nullable: false),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_OrdersSpecs", x => x.Id);
                    table.ForeignKey(
                        name: "FK_OrdersSpecs_Goods_GoodsId",
                        column: x => x.GoodsId,
                        principalTable: "Goods",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_OrdersSpecs_GoodsSpecs_GoodsSpecsId",
                        column: x => x.GoodsSpecsId,
                        principalTable: "GoodsSpecs",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_OrdersSpecs_Orders_OrdersId",
                        column: x => x.OrdersId,
                        principalTable: "Orders",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "UsersGoods",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    GoodsId = table.Column<int>(type: "integer", nullable: false),
                    UsersId = table.Column<int>(type: "integer", nullable: false),
                    CommentsId = table.Column<int>(type: "integer", nullable: false),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_UsersGoods", x => x.Id);
                    table.ForeignKey(
                        name: "FK_UsersGoods_Comments_CommentsId",
                        column: x => x.CommentsId,
                        principalTable: "Comments",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_UsersGoods_Goods_GoodsId",
                        column: x => x.GoodsId,
                        principalTable: "Goods",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_UsersGoods_Users_UsersId",
                        column: x => x.UsersId,
                        principalTable: "Users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "UsersInfos",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    UsersId = table.Column<int>(type: "integer", nullable: false),
                    Recieve = table.Column<string>(type: "text", nullable: true),
                    TelePhone = table.Column<long>(type: "bigint", nullable: false),
                    Address = table.Column<string>(type: "text", nullable: true),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_UsersInfos", x => x.Id);
                    table.ForeignKey(
                        name: "FK_UsersInfos_Users_UsersId",
                        column: x => x.UsersId,
                        principalTable: "Users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "UsersOrders",
                columns: table => new
                {
                    Id = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    UsersId = table.Column<int>(type: "integer", nullable: false),
                    OrdersId = table.Column<int>(type: "integer", nullable: false),
                    PayWaysId = table.Column<int>(type: "integer", nullable: false),
                    IsActived = table.Column<bool>(type: "boolean", nullable: false),
                    IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
                    DisplayOrder = table.Column<int>(type: "integer", nullable: false),
                    Remarks = table.Column<string>(type: "text", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_UsersOrders", x => x.Id);
                    table.ForeignKey(
                        name: "FK_UsersOrders_Orders_OrdersId",
                        column: x => x.OrdersId,
                        principalTable: "Orders",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_UsersOrders_PayWays_PayWaysId",
                        column: x => x.PayWaysId,
                        principalTable: "PayWays",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_UsersOrders_Users_UsersId",
                        column: x => x.UsersId,
                        principalTable: "Users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.InsertData(
                table: "AttributeValues",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Remarks", "UpdatedTime", "Values" },
                values: new object[,]
                {
                    { 1, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(5572), 0, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(5576), "蓝色" },
                    { 2, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(5806), 0, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(5809), "粉色" },
                    { 3, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(5819), 0, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(5820), "S" },
                    { 4, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(5821), 0, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(5822), "M" },
                    { 5, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(5823), 0, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(5824), "L" }
                });

            migrationBuilder.InsertData(
                table: "Attributes",
                columns: new[] { "Id", "AttributeName", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Remarks", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, "颜色", new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(4929), 0, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(4933) },
                    { 2, "尺寸", new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(5164), 0, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(5167) }
                });

            migrationBuilder.InsertData(
                table: "Catagorys",
                columns: new[] { "Id", "CatagoryName", "CatagorysId", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Order", "ParentId", "Remarks", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, "手机", null, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(6210), 0, true, false, "一级", 0, null, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(6214) },
                    { 2, "苹果手机", null, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(6795), 0, true, false, "二级", 1, null, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(6799) }
                });

            migrationBuilder.InsertData(
                table: "Comments",
                columns: new[] { "Id", "Comment", "CommentScore", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Remarks", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, "客服服务态度真诚 好评", 100, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(7195), 0, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(7198) },
                    { 2, "手机用起来像素很高 真的好用 爱心爱心", 100, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(7586), 0, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(7589) }
                });

            migrationBuilder.InsertData(
                table: "Goods",
                columns: new[] { "Id", "CreatedTime", "CurrentPrices", "Description", "DisplayOrder", "GoodsCode", "GoodsName", "IsActived", "IsDeleted", "Number", "Prices", "Remarks", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(8673), 288.0, "高清128G", 0, 12, "正品水滴穿孔P50全网通5G智能手机512GB游戏学生价安卓适用华为线", true, false, 1000, 488.0, null, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(8677) },
                    { 2, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(9790), 288.20999999999998, "高清128G", 0, 2313, "正品水滴穿孔P50全网通5G智能手机512GB游戏学生价安卓适用华为线", true, false, 321, 488.32100000000003, null, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(9793) }
                });

            migrationBuilder.InsertData(
                table: "InTurns",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "GoodsId", "InTurnPictures", "IsActived", "IsDeleted", "Remarks", "UpdatedTime" },
                values: new object[,]
                {
                    { 3, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(4144), 0, 2, "https://img12.360buyimg.com/n1/s450x450_jfs/t1/190129/33/18394/128789/6119d50cE358c2d65/fd1862a5acfdcc9d.jpg", true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(4145) },
                    { 1, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(3656), 0, 1, "https://gd3.alicdn.com/imgextra/i3/3248078737/O1CN01upM2QW2EPb7f6QL4v_!!3248078737.jpg", true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(3660) },
                    { 2, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(4124), 0, 1, "https://gd3.alicdn.com/imgextra/i3/3248078737/O1CN01upM2QW2EPb7f6QL4v_!!3248078737.jpg", true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(4128) }
                });

            migrationBuilder.InsertData(
                table: "Orders",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Number", "OrderCode", "Price", "Remarks", "TotalMoney", "UpdatedTime" },
                values: new object[] { 1, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(229), 0, true, false, 1, 123, 488.0, null, 488.0, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(233) });

            migrationBuilder.InsertData(
                table: "PayWays",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Remarks", "UpdatedTime", "Ways" },
                values: new object[,]
                {
                    { 1, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(1354), 0, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(1358), "支付宝" },
                    { 2, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(1574), 0, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(1577), "微信" }
                });

            migrationBuilder.InsertData(
                table: "Photos",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Picture", "Remarks", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(1948), 0, true, false, "https://gd3.alicdn.com/imgextra/i3/3248078737/O1CN01upM2QW2EPb7f6QL4v_!!3248078737.jpg", null, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(1952) },
                    { 2, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(2166), 0, true, false, "https://gd1.alicdn.com/imgextra/i1/3248078737/O1CN01CwcifG2EPb7avgdN7_!!3248078737.jpg", null, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(2169) },
                    { 3, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(2176), 0, true, false, "https://gd3.alicdn.com/imgextra/i3/3248078737/O1CN01uS23E52EPb7cxnmTJ_!!3248078737.jpg", null, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(2177) }
                });

            migrationBuilder.InsertData(
                table: "ShoppingMalls",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "ICP", "IsActived", "IsDeleted", "Logo", "MallName", "Public", "Remarks", "UpdatedTime" },
                values: new object[] { 1, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(2557), 0, "浙公网安备111000000809010号", true, false, "http://localhost:8080/img/logo.f3a91fbc.jpg", "就爱淘宝", "浙ICP备11400800号", null, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(2561) });

            migrationBuilder.InsertData(
                table: "Shoppings",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Number", "Price", "Remarks", "Sum", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(2218), 0, true, false, 0, 0.0, null, 0.0, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(2225) },
                    { 2, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(3116), 0, true, false, 0, 0.0, null, 0.0, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(3122) }
                });

            migrationBuilder.InsertData(
                table: "Types",
                columns: new[] { "Id", "CommentType", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Remarks", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, "好评", new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(7971), 0, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(7974) },
                    { 2, "差评", new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(8283), 0, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(8287) }
                });

            migrationBuilder.InsertData(
                table: "CommentTypes",
                columns: new[] { "Id", "CommentsId", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Remarks", "TypesId", "UpdatedTime" },
                values: new object[,]
                {
                    { 2, 2, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(6011), 0, true, false, null, 1, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(6014) },
                    { 1, 1, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(5631), 0, true, false, null, 1, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(5635) }
                });

            migrationBuilder.InsertData(
                table: "GoodsAttributes",
                columns: new[] { "Id", "AttributeValuesId", "AttributesId", "CreatedTime", "DisplayOrder", "GoodsId", "IsActived", "IsDeleted", "Remarks", "UpdatedTime" },
                values: new object[,]
                {
                    { 10, 5, 2, new DateTime(2021, 8, 25, 8, 56, 49, 350, DateTimeKind.Local).AddTicks(3466), 0, 2, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 350, DateTimeKind.Local).AddTicks(3467) },
                    { 9, 4, 2, new DateTime(2021, 8, 25, 8, 56, 49, 350, DateTimeKind.Local).AddTicks(3463), 0, 2, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 350, DateTimeKind.Local).AddTicks(3464) },
                    { 7, 2, 1, new DateTime(2021, 8, 25, 8, 56, 49, 350, DateTimeKind.Local).AddTicks(3459), 0, 2, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 350, DateTimeKind.Local).AddTicks(3460) },
                    { 6, 1, 1, new DateTime(2021, 8, 25, 8, 56, 49, 350, DateTimeKind.Local).AddTicks(3456), 0, 2, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 350, DateTimeKind.Local).AddTicks(3458) },
                    { 8, 3, 2, new DateTime(2021, 8, 25, 8, 56, 49, 350, DateTimeKind.Local).AddTicks(3461), 0, 2, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 350, DateTimeKind.Local).AddTicks(3462) },
                    { 4, 4, 2, new DateTime(2021, 8, 25, 8, 56, 49, 350, DateTimeKind.Local).AddTicks(3452), 0, 1, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 350, DateTimeKind.Local).AddTicks(3453) },
                    { 3, 3, 2, new DateTime(2021, 8, 25, 8, 56, 49, 350, DateTimeKind.Local).AddTicks(3449), 0, 1, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 350, DateTimeKind.Local).AddTicks(3450) },
                    { 2, 2, 1, new DateTime(2021, 8, 25, 8, 56, 49, 350, DateTimeKind.Local).AddTicks(3382), 0, 1, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 350, DateTimeKind.Local).AddTicks(3399) },
                    { 1, 1, 1, new DateTime(2021, 8, 25, 8, 56, 49, 349, DateTimeKind.Local).AddTicks(679), 0, 1, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 350, DateTimeKind.Local).AddTicks(1915) },
                    { 5, 5, 2, new DateTime(2021, 8, 25, 8, 56, 49, 350, DateTimeKind.Local).AddTicks(3454), 0, 1, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 350, DateTimeKind.Local).AddTicks(3455) }
                });

            migrationBuilder.InsertData(
                table: "GoodsCatagorys",
                columns: new[] { "Id", "CatagorysId", "CreatedTime", "DisplayOrder", "GoodsId", "IsActived", "IsDeleted", "Remarks", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, 1, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(6482), 0, 1, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(6486) },
                    { 2, 2, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(6862), 0, 2, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(6866) }
                });

            migrationBuilder.InsertData(
                table: "GoodsPhotos",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "GoodsId", "IsActived", "IsDeleted", "PhotosId", "Remarks", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(7249), 0, 1, true, false, 1, null, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(7252) },
                    { 2, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(7627), 0, 1, true, false, 2, null, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(7631) },
                    { 3, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(7663), 0, 2, true, false, 3, null, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(7664) }
                });

            migrationBuilder.InsertData(
                table: "GoodsSpecs",
                columns: new[] { "Id", "AttributeValuesId", "AttributesId", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Remarks", "UpdatedTime" },
                values: new object[,]
                {
                    { 2, 5, 2, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(8415), 0, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(8418) },
                    { 1, 1, 1, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(8037), 0, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(8041) }
                });

            migrationBuilder.InsertData(
                table: "Users",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "IsManagement", "IsMerchant", "Password", "Remarks", "ShoppingsId", "UpdatedTime", "Username" },
                values: new object[,]
                {
                    { 1, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(3598), 0, true, false, true, false, "123", null, 1, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(3602), "admin" },
                    { 2, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(4482), 0, true, false, false, false, "123", null, 2, new DateTime(2021, 8, 25, 8, 56, 49, 351, DateTimeKind.Local).AddTicks(4487), "mochengi" }
                });

            migrationBuilder.InsertData(
                table: "OrdersSpecs",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "GoodsId", "GoodsSpecsId", "IsActived", "IsDeleted", "OrdersId", "Remarks", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(8801), 0, 1, 1, true, false, 1, null, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(8804) },
                    { 3, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(9367), 0, 2, 1, true, false, 1, null, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(9368) },
                    { 2, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(9344), 0, 1, 2, true, false, 1, null, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(9347) },
                    { 4, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(9370), 0, 2, 2, true, false, 1, null, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(9371) }
                });

            migrationBuilder.InsertData(
                table: "UsersGoods",
                columns: new[] { "Id", "CommentsId", "CreatedTime", "DisplayOrder", "GoodsId", "IsActived", "IsDeleted", "Remarks", "UpdatedTime", "UsersId" },
                values: new object[,]
                {
                    { 1, 1, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(9749), 0, 1, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(9752), 2 },
                    { 2, 2, new DateTime(2021, 8, 25, 8, 56, 49, 353, DateTimeKind.Local).AddTicks(295), 0, 2, true, false, null, new DateTime(2021, 8, 25, 8, 56, 49, 353, DateTimeKind.Local).AddTicks(298), 2 }
                });

            migrationBuilder.InsertData(
                table: "UsersInfos",
                columns: new[] { "Id", "Address", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Recieve", "Remarks", "TelePhone", "UpdatedTime", "UsersId" },
                values: new object[] { 1, "江西省南昌市进贤县204号", new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(4525), 0, true, false, "超群", null, 13870613279L, new DateTime(2021, 8, 25, 8, 56, 49, 352, DateTimeKind.Local).AddTicks(4529), 2 });

            migrationBuilder.InsertData(
                table: "UsersOrders",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "OrdersId", "PayWaysId", "Remarks", "UpdatedTime", "UsersId" },
                values: new object[] { 1, new DateTime(2021, 8, 25, 8, 56, 49, 353, DateTimeKind.Local).AddTicks(692), 0, true, false, 1, 1, null, new DateTime(2021, 8, 25, 8, 56, 49, 353, DateTimeKind.Local).AddTicks(695), 2 });

            migrationBuilder.CreateIndex(
                name: "IX_Catagorys_CatagorysId",
                table: "Catagorys",
                column: "CatagorysId");

            migrationBuilder.CreateIndex(
                name: "IX_CommentTypes_CommentsId",
                table: "CommentTypes",
                column: "CommentsId");

            migrationBuilder.CreateIndex(
                name: "IX_CommentTypes_TypesId",
                table: "CommentTypes",
                column: "TypesId");

            migrationBuilder.CreateIndex(
                name: "IX_GoodsAttributes_AttributesId",
                table: "GoodsAttributes",
                column: "AttributesId");

            migrationBuilder.CreateIndex(
                name: "IX_GoodsAttributes_AttributeValuesId",
                table: "GoodsAttributes",
                column: "AttributeValuesId");

            migrationBuilder.CreateIndex(
                name: "IX_GoodsAttributes_GoodsId",
                table: "GoodsAttributes",
                column: "GoodsId");

            migrationBuilder.CreateIndex(
                name: "IX_GoodsCatagorys_CatagorysId",
                table: "GoodsCatagorys",
                column: "CatagorysId");

            migrationBuilder.CreateIndex(
                name: "IX_GoodsCatagorys_GoodsId",
                table: "GoodsCatagorys",
                column: "GoodsId");

            migrationBuilder.CreateIndex(
                name: "IX_GoodsPhotos_GoodsId",
                table: "GoodsPhotos",
                column: "GoodsId");

            migrationBuilder.CreateIndex(
                name: "IX_GoodsPhotos_PhotosId",
                table: "GoodsPhotos",
                column: "PhotosId");

            migrationBuilder.CreateIndex(
                name: "IX_GoodsSpecs_AttributesId",
                table: "GoodsSpecs",
                column: "AttributesId");

            migrationBuilder.CreateIndex(
                name: "IX_GoodsSpecs_AttributeValuesId",
                table: "GoodsSpecs",
                column: "AttributeValuesId");

            migrationBuilder.CreateIndex(
                name: "IX_OrdersSpecs_GoodsId",
                table: "OrdersSpecs",
                column: "GoodsId");

            migrationBuilder.CreateIndex(
                name: "IX_OrdersSpecs_GoodsSpecsId",
                table: "OrdersSpecs",
                column: "GoodsSpecsId");

            migrationBuilder.CreateIndex(
                name: "IX_OrdersSpecs_OrdersId",
                table: "OrdersSpecs",
                column: "OrdersId");

            migrationBuilder.CreateIndex(
                name: "IX_Users_ShoppingsId",
                table: "Users",
                column: "ShoppingsId");

            migrationBuilder.CreateIndex(
                name: "IX_UsersGoods_CommentsId",
                table: "UsersGoods",
                column: "CommentsId");

            migrationBuilder.CreateIndex(
                name: "IX_UsersGoods_GoodsId",
                table: "UsersGoods",
                column: "GoodsId");

            migrationBuilder.CreateIndex(
                name: "IX_UsersGoods_UsersId",
                table: "UsersGoods",
                column: "UsersId");

            migrationBuilder.CreateIndex(
                name: "IX_UsersInfos_UsersId",
                table: "UsersInfos",
                column: "UsersId");

            migrationBuilder.CreateIndex(
                name: "IX_UsersOrders_OrdersId",
                table: "UsersOrders",
                column: "OrdersId");

            migrationBuilder.CreateIndex(
                name: "IX_UsersOrders_PayWaysId",
                table: "UsersOrders",
                column: "PayWaysId");

            migrationBuilder.CreateIndex(
                name: "IX_UsersOrders_UsersId",
                table: "UsersOrders",
                column: "UsersId");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "AuditInfo");

            migrationBuilder.DropTable(
                name: "CommentTypes");

            migrationBuilder.DropTable(
                name: "GoodsAttributes");

            migrationBuilder.DropTable(
                name: "GoodsCatagorys");

            migrationBuilder.DropTable(
                name: "GoodsPhotos");

            migrationBuilder.DropTable(
                name: "InTurns");

            migrationBuilder.DropTable(
                name: "OrdersSpecs");

            migrationBuilder.DropTable(
                name: "ShoppingMalls");

            migrationBuilder.DropTable(
                name: "UsersGoods");

            migrationBuilder.DropTable(
                name: "UsersInfos");

            migrationBuilder.DropTable(
                name: "UsersOrders");

            migrationBuilder.DropTable(
                name: "Types");

            migrationBuilder.DropTable(
                name: "Catagorys");

            migrationBuilder.DropTable(
                name: "Photos");

            migrationBuilder.DropTable(
                name: "GoodsSpecs");

            migrationBuilder.DropTable(
                name: "Comments");

            migrationBuilder.DropTable(
                name: "Goods");

            migrationBuilder.DropTable(
                name: "Orders");

            migrationBuilder.DropTable(
                name: "PayWays");

            migrationBuilder.DropTable(
                name: "Users");

            migrationBuilder.DropTable(
                name: "Attributes");

            migrationBuilder.DropTable(
                name: "AttributeValues");

            migrationBuilder.DropTable(
                name: "Shoppings");
        }
    }
}
